package cn.yuanqiao.archive.bianyan.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.List;
import java.util.Map;

/**
 * 档案资源库对象
 *
 * @ProjectName: JZSDAS
 * @Package: cn.yuanqiao.archive.bianyan.domain
 * @ClassName: YqDaGerenKu
 * @Author: lenovo
 * @Description: hbWang
 * @Date: 2023/9/18 17:17
 * @Version: 1.0
 */
public class YqDaGerenKu extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQ_DA_GEREN_KU";

    private String tableName;

    public YqDaGerenKu() {
        String tenantCode = SecurityUtils.getTenantCode();
        if (StringUtils.isEmpty(tenantCode)) {
            throw new ServiceException("TenantCode is null");
        } else {
            this.tableName = tenantCode.toUpperCase() + BIGTABLENAME;
        }
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /**
     * 主键id
     */
    private String id;

    /**
     * 档案id
     */
    private String daId;

    /**
     * 档案类型
     */
    @Excel(name = "档案类型")
    private String daType;

    /**
     * 档号
     */
    @Excel(name = "档号")
    private String daDh;

    /**
     * 题名
     */
    @Excel(name = "题名")
    private String daTitle;

    /**
     * 年度
     */
    @Excel(name = "年度")
    private String daNd;

    /**
     * 密级
     */
    @Excel(name = "密级")
    private String daMj;

    /**
     * 保管期限
     */
    @Excel(name = "保管期限")
    private String daBgqx;

    /**
     * 关联表名
     */
    private String subTableName;

    /**
     * 创建人ID
     */
    private String creatorId;

    /**
     * 创建人
     */
    private String creatorBy;

    /**
     * 创建时间
     */
    private String creatorTime;

    /**
     * 类型 1 个人 2 专题 3 公共
     */
    @Excel(name = "类型 1 个人 2 专题 3 公共")
    private String typeState;

    private String searchFile;

    public String getSearchFile() {
        return searchFile;
    }

    public void setSearchFile(String searchFile) {
        this.searchFile = searchFile;
    }

    private List<Map<String, Object>> mapList;

    public List<Map<String, Object>> getMapList() {
        return mapList;
    }

    public void setMapList(List<Map<String, Object>> mapList) {
        this.mapList = mapList;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setDaId(String daId) {
        this.daId = daId;
    }

    public String getDaId() {
        return daId;
    }

    public void setDaType(String daType) {
        this.daType = daType;
    }

    public String getDaType() {
        return daType;
    }

    public void setDaDh(String daDh) {
        this.daDh = daDh;
    }

    public String getDaDh() {
        return daDh;
    }

    public void setDaTitle(String daTitle) {
        this.daTitle = daTitle;
    }

    public String getDaTitle() {
        return daTitle;
    }

    public void setDaNd(String daNd) {
        this.daNd = daNd;
    }

    public String getDaNd() {
        return daNd;
    }

    public void setDaMj(String daMj) {
        this.daMj = daMj;
    }

    public String getDaMj() {
        return daMj;
    }

    public void setDaBgqx(String daBgqx) {
        this.daBgqx = daBgqx;
    }

    public String getDaBgqx() {
        return daBgqx;
    }

    public void setSubTableName(String subTableName) {
        this.subTableName = subTableName;
    }

    public String getSubTableName() {
        return subTableName;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorBy(String creatorBy) {
        this.creatorBy = creatorBy;
    }

    public String getCreatorBy() {
        return creatorBy;
    }

    public void setCreatorTime(String creatorTime) {
        this.creatorTime = creatorTime;
    }

    public String getCreatorTime() {
        return creatorTime;
    }

    public void setTypeState(String typeState) {
        this.typeState = typeState;
    }

    public String getTypeState() {
        return typeState;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("tableName", tableName)
                .append("id", id)
                .append("daId", daId)
                .append("daType", daType)
                .append("daDh", daDh)
                .append("daTitle", daTitle)
                .append("daNd", daNd)
                .append("daMj", daMj)
                .append("daBgqx", daBgqx)
                .append("subTableName", subTableName)
                .append("creatorId", creatorId)
                .append("creatorBy", creatorBy)
                .append("creatorTime", creatorTime)
                .append("typeState", typeState)
                .append("searchFile", searchFile)
                .toString();
    }
}
